﻿@model DHQGHN.PM0.Models.Admin.GroupModel
@{
    var lstRole = ViewBag.lstRoleByGroupId;
    var lstApp = ViewBag.lstAppByGroupId;
    var lstGroup = ViewBag.lstGroup;
}

@using (
                            Html.BeginForm(
                                actionName: "actionCreateOrUpdateUserInRole", controllerName: "Group", routeValues: new { }, method: FormMethod.Post, htmlAttributes: new { @id = "user-in-role-form", @class = "form-inline", @role = "form", @style = "width: 100%;" }
                                )
                            )
{
    <div class="modal-body min-width">
        <div class="form-group" style="width:500px">
            @Html.AntiForgeryToken()
            <div>
                <div>
                    <label class="labels" style="width:140px;">Tên nhóm</label>
                    <label style="font-family:Arial;font-size:small;font-style:oblique;color:#ff0000;text-align:center">@lstGroup</label>
                </div>
                <label class="labels" style="width:140px">Vai trò của nhóm</label>
                <div style="max-height: 200px; overflow: auto; resize: none; margin-left: 110px; width:80%; text-align:right">
                    @if (lstRole.Count == 0)
                    {
                        <tr>
                            <td>
                                <span style="color: #0094ff; font-family: Arial; font-style: italic; margin-right: 168px">Nhóm chưa được gán vai trò</span>
                            </td>
                        </tr>
                    }
                    else
                    {
                        <table class="tbl-list" style="text-align: left">


                            @for (int i = 0; i < lstRole.Count; i++)
                            {
                                <tr>
                                    <td style="width:30%">
                                        <div>
                                            @lstRole[i].RoleName
                                        </div>
                                    </td>
                                </tr>
                            }

                        </table>
                    }
                </div>
                <div>
                    <label class="labels" style="width:140px">Ứng dụng được truy cập</label>
                    <div style="max-height: 200px; overflow: auto; resize: none; margin-left: 110px; width:80%; text-align:right">
                        @if (lstApp.Count == 0)
                        {
                            <tr>
                                <td>
                                    <span style="color:#0094ff;font-family:Arial;font-style:italic;margin-right:150px">Nhóm chưa được gán Ứng dụng</span>
                                </td>
                            </tr>
                        }
                        else
                        {
                            <table class="tbl-list" style="text-align: left">

                                @for (int i = 0; i < lstApp.Count; i++)
                                {
                                    <tr>
                                        <td style="width:30%">
                                            <div>
                                                @lstApp[i].AppName
                                            </div>
                                        </td>
                                    </tr>
                                }

                            </table>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
}









